package com.chenhy.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chenhy.server.pojo.Admin;
import com.chenhy.server.pojo.RespBean;
import com.chenhy.server.pojo.Role;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gangan
 * @since 2022-02-13
 */
public interface IAdminService extends IService<Admin> {

    RespBean login(String captcha, String username, String password, HttpServletRequest request);

    Admin getAdminByUserName(String username);

    List<Role> getRoles(Integer id);

    List<Admin> getAllAdmin(String keyword);

    RespBean updateAdminRole(Integer id, Integer[] rids);

    RespBean updateAdminPassword(String oldPass, String pass);

    RespBean updateAdminUserFace(String url);
}
